package com.etc.library.service.impl;

import com.etc.library.dao.BookMapper;
import com.etc.library.pojo.Book;
import com.etc.library.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BookMapper bookMapper;

    @Override
    public boolean add(Book book) {
        return bookMapper.add(book)>0;
    }

    @Override
    public List<Map<String, Object>> list(Map<String, Object> params) {
        return bookMapper.list(params);
    }
}
